
package com.gitee.jmash.oidc.client.web.models;

import jakarta.enterprise.inject.Model;
import jakarta.mvc.binding.MvcBinding;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import jakarta.ws.rs.DefaultValue;
import jakarta.ws.rs.FormParam;
import java.io.Serializable;

/**
 * 登录请求Model.
 *
 * @author CGD
 *
 */
@Model
public class LoginModel implements Serializable {

  private static final long serialVersionUID = 1L;

  @MvcBinding
  @FormParam("username")
  @NotNull
  @Size(min = 3, max = 30)
  private String username;

  @MvcBinding
  @FormParam("password")
  @NotNull
  @Size(min = 8, max = 30)
  private String password;

  @FormParam("remember")
  @DefaultValue("false")
  private boolean remember;

  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public boolean isRemember() {
    return remember;
  }

  public void setRemember(boolean remember) {
    this.remember = remember;
  }

}
